package com.zhaokuner.myp.impl;

import com.zhaokuner.mypc.DemoService;
import org.apache.dubbo.config.annotation.DubboService;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * <p>
 * Description:TODO 详细描述
 * <p>
 * Copyright: 天津联想协同科技有限公司
 * <p>
 *
 * @author 赵希坤 zhaoxikun
 * @date 2021/11/16 3:44 下午
 */
@DubboService
public class DemoServiceImpl implements DemoService {
    @Override
    public String hello() {
        try {
            System.out.println(InetAddress.getLocalHost().getHostAddress());
            return InetAddress.getLocalHost().getHostAddress()+" "+System.currentTimeMillis();
        } catch (UnknownHostException e) {
            return e.getMessage();
        }
    }
}
